package org.singledog.form.builder.dataset;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class NormalClassDataSet extends LocalSpringServiceDataSet {

    @Override
    public DataSetType supportDataSetType() {
        return DataSetType.CLASS;
    }

    @Override
    protected Object getTargetObject(DataSetMeta meta, Class clazz) {
        try {
            return clazz.newInstance();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }

        return super.getTargetObject(meta, clazz);
    }
}
